﻿@model IEnumerable<CardInChina.Data.Entity.Entity.Game>

<div class="saleTop">
    <div class="lm">
        <h2>
            游戏排行<span>TOP 10</span></h2>
    </div>
    <div class="saleTop_list">
        <div class="saleTop_list_bg">
            <!-- Accordion -->
            <div class="tabcon" id="game-top">
                @for (int i = 0; i < Model.Count(); i++)
                {
                    CardInChina.Data.Entity.Entity.Game ci = Model.ElementAt(i);
                    <h3>
                    <span class="ui-icons ui-icon-fore@(i+1)"></span>
                    @Html.ActionLink(ci.GameName, "Index", "Game", new { gameKey = ci.GameKey }, null)
                    </h3>
                <div class="p-img">
                    @if (ci.GamePhoto == null)
                    {
                        <a href="@Url.Action("Index", "Game", new { gameKey = ci.GameKey }, null)">
                         <img src="/content/images/ss.gif" /></a>
                    }
                    else
                    {
                        <a href="@Url.Action("Index", "Game", new { gameKey = ci.GameKey }, null)">
                        <img src="/content/images/photo/@ci.GamePhoto" /></a>
                    }
                    </div>
                }
            </div>
        </div>
    </div>
    <div class="lb">
    </div>
</div>

<script type="text/javascript">
    $(function () {
        $("#game-top").accordion({
            event: "mouseover"
        });
    });
</script>